package com.bjgzy.rating.mvp.model;

import com.bjgzy.rating.mvp.contract.MyWorksContract;
import com.eduhzy.ttw.commonsdk.entity.CommonData;
import com.eduhzy.ttw.commonsdk.entity.MyWorksData;
import com.eduhzy.ttw.commonsdk.http.CommonApi;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;

import java.util.List;
import java.util.Map;

import javax.inject.Inject;

import io.reactivex.Observable;

/**
 * @author xubo
 * @date 2018-8-30 20:32:07
 */
@ActivityScope
public class MyWorksModel extends BaseModel implements MyWorksContract.Model {


    @Inject
    public MyWorksModel(IRepositoryManager repositoryManager) {
        super(repositoryManager);
    }

    @Override
    public Observable<CommonData<List<MyWorksData>>> getMyWorks(Map<String, Object> map) {
        return mRepositoryManager.obtainRetrofitService(CommonApi.class).getMyWorks(map);
    }
}